home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.1 (Developer) [x86] / NeXT Step 3.1 Intel dev.cdr.dmg / NextDeveloper / Headers / bsd / dev / kmreg_com.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-30  |  2.1 KB  |  77 lines

  1. /*     Copyright (c) 1992 NeXT Computer, Inc.  All rights reserved. 
  2.  *
  3.  * kmreg_com.h - machine independent km ioctl interface.
  4.  *
  5.  * HISTORY
  6.  * 16-Jan-92    Doug Mitchell at NeXT 
  7.  *      Created. 
  8.  */
  9.  
  10. #ifndef    _BSD_DEV_KMREG_COM_
  11. #define _BSD_DEV_KMREG_COM_
  12.  
  13. #import <sys/types.h>
  14. #import <sys/ioctl.h> 
  15.  
  16. /* 
  17.  * Colors for fg, bg in struct km_drawrect 
  18.  */
  19. #define KM_COLOR_WHITE        0
  20. #define KM_COLOR_LTGRAY        1
  21. #define KM_COLOR_DKGRAY        2
  22. #define KM_COLOR_BLACK        3
  23.  
  24. /*
  25.  * The data to be rendered is treated as a pixmap of 2 bit pixels.
  26.  * The most significant bits of each byte is the leftmost pixel in that 
  27.  * byte.  Pixel values are assigned as described above.
  28.  *
  29.  * Each scanline should start on a 4 pixel boundry within the bitmap,
  30.  * and should be a multiple of 4 pixels in length.
  31.  *
  32.  * For the KMIOCERASERECT call, 'data' should be an integer set to the 
  33.  * color to be used for the clear operation (data.fill).
  34.  * A rect at (x,y) measuring 'width' by 'height' will be cleared to 
  35.  * the specified value.
  36.  */
  37. struct km_drawrect {
  38.     unsigned short x;    /* Upper left corner of rect to be imaged. */
  39.     unsigned short y;
  40.     unsigned short width;    /* Width and height of rect to be imaged, 
  41.                  * in pixels */
  42.     unsigned short height;
  43.     union {
  44.         void *bits;    /* Pointer to 2 bit per pixel raster data. */
  45.         int   fill;    /* Const color for erase operation. */
  46.     } data;
  47. };
  48.  
  49. /*
  50.  * Argument to KMIOCANIMCTL.
  51.  */
  52. typedef enum {
  53.     KM_ANIM_STOP,        /* stop permanently */
  54.     KM_ANIM_SUSPEND,    /* suspend */
  55.     KM_ANIM_RESUME        /* resume */
  56. } km_anim_ctl_t;
  57.  
  58. #define    KMIOCPOPUP    _IO('k', 1)        /* popup new window */
  59. #define    KMIOCRESTORE    _IO('k', 2)        /* restore background */
  60. #define    KMIOCDUMPLOG    _IO('k', 3)        /* dump message log */
  61. #define KMIOCDRAWRECT    _IOW('k', 5, struct km_drawrect)  /* Draw rect from 
  62.                                * bits */
  63. #define KMIOCERASERECT    _IOW('k', 6, struct km_drawrect)  /* Erase a rect */
  64.  
  65.  
  66. #define KMIOCANIMCTL    _IOW('k',9, km_anim_ctl_t)    
  67.                         /* stop animation */
  68. #define KMIOCSTATUS    _IOR('k',10, int)    /* get status bits */
  69.  
  70. /*
  71.  * Status bits returned via KMIOCSTATUS.
  72.  */
  73. #define KMS_SEE_MSGS    0x00000001
  74.  
  75. #endif    _BSD_DEV_KMREG_COM_
  76.  
  77.